<!DOCTYPE html>
<html>
 <head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
  <meta content="width=device-width, initial-scale=1" name="viewport"/>
  <meta content="#375EAB" name="theme-color"/>
  <title>
   schemaregistry - Go Documentation Server
  </title>
  <link href="https://go.dev/css/styles.css" rel="stylesheet" type="text/css"/>
  <script>
   window.initFuncs = [];
  </script>
  <script defer="" src="https://go.dev/js/jquery.js">
  </script>
  <script>
   var goVersion = "go1.22.2";
  </script>
  <script defer="" src="https://go.dev/js/godocs.js">
  </script>
 </head>
 <body>
  <div id="lowframe" style="position: fixed; bottom: 0; left: 0; height: 0; width: 100%; border-top: thin solid grey; background-color: white; overflow: auto;">
   ...
  </div>
  <!-- #lowframe -->
  <div class="wide" id="page">
   <div class="container">
    <h1>
     Package schemaregistry
     <span class="text-muted">
     </span>
    </h1>
    <div id="nav">
    </div>
    <!--
	Copyright 2009 The Go Authors. All rights reserved.
	Use of this source code is governed by a BSD-style
	license that can be found in the LICENSE file.
-->
    <!--
	Note: Static (i.e., not template-generated) href and id
	attributes start with "pkg-" to make it impossible for
	them to conflict with generated attributes (some of which
	correspond to Go identifiers).
-->
    <script>
     document.ANALYSIS_DATA = null;
	document.CALLGRAPH = null;
    </script>
    <div id="short-nav">
     <dl>
      <dd>
       <code>
        import "github.com/confluentinc/confluent-kafka-go/v2/schemaregistry"
       </code>
      </dd>
     </dl>
     <dl>
      <dd>
       <a class="overviewLink" href="#pkg-overview">
        Overview
       </a>
      </dd>
      <dd>
       <a class="indexLink" href="#pkg-index">
        Index
       </a>
      </dd>
      <dd>
      </dd>
     </dl>
    </div>
    <!-- The package's Name is printed as title by the top-level template -->
    <div class="toggleVisible" id="pkg-overview">
     <div class="collapsed">
      <h2 class="toggleButton" title="Click to show Overview section">
       Overview ▹
      </h2>
     </div>
     <div class="expanded">
      <h2 class="toggleButton" title="Click to hide Overview section">
       Overview ▾
      </h2>
     </div>
    </div>
    <div class="toggleVisible" id="pkg-index">
     <div class="collapsed">
      <h2 class="toggleButton" title="Click to show Index section">
       Index ▹
      </h2>
     </div>
     <div class="expanded">
      <h2 class="toggleButton" title="Click to hide Index section">
       Index ▾
      </h2>
      <!-- Table of contents for API; must be named manual-nav to turn off auto nav. -->
      <div id="manual-nav">
       <dl>
        <dd>
         <a href="#pkg-constants">
          Constants
         </a>
        </dd>
        <dd>
         <a href="#ConfigsEqual">
          func ConfigsEqual(c1 *Config, c2 *Config) bool
         </a>
        </dd>
        <dd>
         <a href="#Client">
          type Client
         </a>
        </dd>
        <dd>
         <a href="#NewClient">
          func NewClient(conf *Config) (Client, error)
         </a>
        </dd>
        <dd>
         <a href="#Compatibility">
          type Compatibility
         </a>
        </dd>
        <dd>
         <a href="#Compatibility.MarshalJSON">
          func (c *Compatibility) MarshalJSON() ([]byte, error)
         </a>
        </dd>
        <dd>
         <a href="#Compatibility.ParseString">
          func (c *Compatibility) ParseString(val string) error
         </a>
        </dd>
        <dd>
         <a href="#Compatibility.String">
          func (c *Compatibility) String() string
         </a>
        </dd>
        <dd>
         <a href="#Compatibility.UnmarshalJSON">
          func (c *Compatibility) UnmarshalJSON(b []byte) error
         </a>
        </dd>
        <dd>
         <a href="#Config">
          type Config
         </a>
        </dd>
        <dd>
         <a href="#NewConfig">
          func NewConfig(url string) *Config
         </a>
        </dd>
        <dd>
         <a href="#NewConfigWithAuthentication">
          func NewConfigWithAuthentication(url string, username string, password string) *Config
         </a>
        </dd>
        <dd>
         <a href="#NewConfigWithBasicAuthentication">
          func NewConfigWithBasicAuthentication(url string, username string, password string) *Config
         </a>
        </dd>
        <dd>
         <a href="#NewConfigWithBearerAuthentication">
          func NewConfigWithBearerAuthentication(url, token, targetSr, identityPoolID string) *Config
         </a>
        </dd>
        <dd>
         <a href="#Metadata">
          type Metadata
         </a>
        </dd>
        <dd>
         <a href="#Reference">
          type Reference
         </a>
        </dd>
        <dd>
         <a href="#Rule">
          type Rule
         </a>
        </dd>
        <dd>
         <a href="#RuleMode">
          type RuleMode
         </a>
        </dd>
        <dd>
         <a href="#ParseMode">
          func ParseMode(mode string) (RuleMode, bool)
         </a>
        </dd>
        <dd>
         <a href="#RulePhase">
          type RulePhase
         </a>
        </dd>
        <dd>
         <a href="#RuleSet">
          type RuleSet
         </a>
        </dd>
        <dd>
         <a href="#RuleSet.HasRules">
          func (r *RuleSet) HasRules(phase RulePhase, mode RuleMode) bool
         </a>
        </dd>
        <dd>
         <a href="#SchemaInfo">
          type SchemaInfo
         </a>
        </dd>
        <dd>
         <a href="#SchemaInfo.MarshalJSON">
          func (sd *SchemaInfo) MarshalJSON() ([]byte, error)
         </a>
        </dd>
        <dd>
         <a href="#SchemaInfo.UnmarshalJSON">
          func (sd *SchemaInfo) UnmarshalJSON(b []byte) error
         </a>
        </dd>
        <dd>
         <a href="#SchemaMetadata">
          type SchemaMetadata
         </a>
        </dd>
        <dd>
         <a href="#SchemaMetadata.MarshalJSON">
          func (sd *SchemaMetadata) MarshalJSON() ([]byte, error)
         </a>
        </dd>
        <dd>
         <a href="#SchemaMetadata.UnmarshalJSON">
          func (sd *SchemaMetadata) UnmarshalJSON(b []byte) error
         </a>
        </dd>
        <dd>
         <a href="#ServerConfig">
          type ServerConfig
         </a>
        </dd>
        <dd>
         <a href="#SubjectAndVersion">
          type SubjectAndVersion
         </a>
        </dd>
       </dl>
      </div>
      <!-- #manual-nav -->
      <h3>
       Package files
      </h3>
      <p>
       <span style="font-size:90%">
        <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/config.go">
         config.go
        </a>
        <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/mock_schemaregistry_client.go">
         mock_schemaregistry_client.go
        </a>
        <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go">
         schemaregistry_client.go
        </a>
        <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/testhelpers.go">
         testhelpers.go
        </a>
       </span>
      </p>
     </div>
     <!-- .expanded -->
    </div>
    <!-- #pkg-index -->
    <h2 id="pkg-constants">
     Constants
    </h2>
    <pre>const (
    <span class="comment">// MigrationPhase denotes migration phase</span>
    <span id="MigrationPhase">MigrationPhase</span> = 1
    <span class="comment">// DomainPhase denotes domain phase</span>
    <span id="DomainPhase">DomainPhase</span> = 2
    <span class="comment">// EncodingPhase denotes encoding phase</span>
    <span id="EncodingPhase">EncodingPhase</span> = 3
)</pre>
    <pre>const (
    <span class="comment">// Upgrade denotes upgrade mode</span>
    <span id="Upgrade">Upgrade</span> = 1
    <span class="comment">// Downgrade denotes downgrade mode</span>
    <span id="Downgrade">Downgrade</span> = 2
    <span class="comment">// UpDown denotes upgrade/downgrade mode</span>
    <span id="UpDown">UpDown</span> = 3
    <span class="comment">// Write denotes write mode</span>
    <span id="Write">Write</span> = 4
    <span class="comment">// Read denotes read mode</span>
    <span id="Read">Read</span> = 5
    <span class="comment">// WriteRead denotes write/read mode</span>
    <span id="WriteRead">WriteRead</span> = 6
)</pre>
    <pre>const (

    <span class="comment">// None is no compatibility</span>
    <span id="None">None</span>
    <span class="comment">// Backward compatibility</span>
    <span id="Backward">Backward</span>
    <span class="comment">// Forward compatibility</span>
    <span id="Forward">Forward</span>
    <span class="comment">// Full compatibility</span>
    <span id="Full">Full</span>
    <span class="comment">// BackwardTransitive compatibility</span>
    <span id="BackwardTransitive">BackwardTransitive</span>
    <span class="comment">// ForwardTransitive compatibility</span>
    <span id="ForwardTransitive">ForwardTransitive</span>
    <span class="comment">// FullTransitive compatibility</span>
    <span id="FullTransitive">FullTransitive</span>
)</pre>
    <h2 id="ConfigsEqual">
     func
     <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/config.go?s=3079:3125#L93">
      ConfigsEqual
     </a>
     <a class="permalink" href="#ConfigsEqual">
      ¶
     </a>
    </h2>
    <pre>func ConfigsEqual(c1 *<a href="#Config">Config</a>, c2 *<a href="#Config">Config</a>) <a href="https://pkg.go.dev/builtin/#bool">bool</a></pre>
    <p>
     ConfigsEqual compares two configurations for approximate equality
     <h2 id="Client">
      type
      <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=12458:14785#L384">
       Client
      </a>
      <a class="permalink" href="#Client">
       ¶
      </a>
     </h2>
     <p>
      Client is an interface for clients interacting with the Confluent Schema Registry.
The Schema Registry's REST interface is further explained in Confluent's Schema Registry API documentation
      <a href="https://github.com/confluentinc/schema-registry/blob/master/client/src/main/java/io/confluent/kafka/schemaregistry/client/SchemaRegistryClient.java">
       https://github.com/confluentinc/schema-registry/blob/master/client/src/main/java/io/confluent/kafka/schemaregistry/client/SchemaRegistryClient.java
      </a>
      <pre>type Client interface {
    Config() *<a href="#Config">Config</a>
    GetAllContexts() ([]<a href="https://pkg.go.dev/builtin/#string">string</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)
    Register(subject <a href="https://pkg.go.dev/builtin/#string">string</a>, schema <a href="#SchemaInfo">SchemaInfo</a>, normalize <a href="https://pkg.go.dev/builtin/#bool">bool</a>) (id <a href="https://pkg.go.dev/builtin/#int">int</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)
    RegisterFullResponse(subject <a href="https://pkg.go.dev/builtin/#string">string</a>, schema <a href="#SchemaInfo">SchemaInfo</a>, normalize <a href="https://pkg.go.dev/builtin/#bool">bool</a>) (result <a href="#SchemaMetadata">SchemaMetadata</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)
    GetBySubjectAndID(subject <a href="https://pkg.go.dev/builtin/#string">string</a>, id <a href="https://pkg.go.dev/builtin/#int">int</a>) (schema <a href="#SchemaInfo">SchemaInfo</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)
    GetByGUID(guid <a href="https://pkg.go.dev/builtin/#string">string</a>) (schema <a href="#SchemaInfo">SchemaInfo</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)
    GetSubjectsAndVersionsByID(id <a href="https://pkg.go.dev/builtin/#int">int</a>) (subjectAndVersion []<a href="#SubjectAndVersion">SubjectAndVersion</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)
    GetID(subject <a href="https://pkg.go.dev/builtin/#string">string</a>, schema <a href="#SchemaInfo">SchemaInfo</a>, normalize <a href="https://pkg.go.dev/builtin/#bool">bool</a>) (id <a href="https://pkg.go.dev/builtin/#int">int</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)
    GetIDFullResponse(subject <a href="https://pkg.go.dev/builtin/#string">string</a>, schema <a href="#SchemaInfo">SchemaInfo</a>, normalize <a href="https://pkg.go.dev/builtin/#bool">bool</a>) (result <a href="#SchemaMetadata">SchemaMetadata</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)
    GetLatestSchemaMetadata(subject <a href="https://pkg.go.dev/builtin/#string">string</a>) (<a href="#SchemaMetadata">SchemaMetadata</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)
    GetSchemaMetadata(subject <a href="https://pkg.go.dev/builtin/#string">string</a>, version <a href="https://pkg.go.dev/builtin/#int">int</a>) (<a href="#SchemaMetadata">SchemaMetadata</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)
    GetSchemaMetadataIncludeDeleted(subject <a href="https://pkg.go.dev/builtin/#string">string</a>, version <a href="https://pkg.go.dev/builtin/#int">int</a>, deleted <a href="https://pkg.go.dev/builtin/#bool">bool</a>) (<a href="#SchemaMetadata">SchemaMetadata</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)
    GetLatestWithMetadata(subject <a href="https://pkg.go.dev/builtin/#string">string</a>, metadata map[<a href="https://pkg.go.dev/builtin/#string">string</a>]<a href="https://pkg.go.dev/builtin/#string">string</a>, deleted <a href="https://pkg.go.dev/builtin/#bool">bool</a>) (<a href="#SchemaMetadata">SchemaMetadata</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)
    GetAllVersions(subject <a href="https://pkg.go.dev/builtin/#string">string</a>) ([]<a href="https://pkg.go.dev/builtin/#int">int</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)
    GetVersion(subject <a href="https://pkg.go.dev/builtin/#string">string</a>, schema <a href="#SchemaInfo">SchemaInfo</a>, normalize <a href="https://pkg.go.dev/builtin/#bool">bool</a>) (version <a href="https://pkg.go.dev/builtin/#int">int</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)
    GetVersionIncludeDeleted(subject <a href="https://pkg.go.dev/builtin/#string">string</a>, schema <a href="#SchemaInfo">SchemaInfo</a>, normalize <a href="https://pkg.go.dev/builtin/#bool">bool</a>, deleted <a href="https://pkg.go.dev/builtin/#bool">bool</a>) (version <a href="https://pkg.go.dev/builtin/#int">int</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)
    GetAllSubjects() ([]<a href="https://pkg.go.dev/builtin/#string">string</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)
    DeleteSubject(subject <a href="https://pkg.go.dev/builtin/#string">string</a>, permanent <a href="https://pkg.go.dev/builtin/#bool">bool</a>) ([]<a href="https://pkg.go.dev/builtin/#int">int</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)
    DeleteSubjectVersion(subject <a href="https://pkg.go.dev/builtin/#string">string</a>, version <a href="https://pkg.go.dev/builtin/#int">int</a>, permanent <a href="https://pkg.go.dev/builtin/#bool">bool</a>) (deletes <a href="https://pkg.go.dev/builtin/#int">int</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)
    TestSubjectCompatibility(subject <a href="https://pkg.go.dev/builtin/#string">string</a>, schema <a href="#SchemaInfo">SchemaInfo</a>) (compatible <a href="https://pkg.go.dev/builtin/#bool">bool</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)
    TestCompatibility(subject <a href="https://pkg.go.dev/builtin/#string">string</a>, version <a href="https://pkg.go.dev/builtin/#int">int</a>, schema <a href="#SchemaInfo">SchemaInfo</a>) (compatible <a href="https://pkg.go.dev/builtin/#bool">bool</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)
    GetCompatibility(subject <a href="https://pkg.go.dev/builtin/#string">string</a>) (compatibility <a href="#Compatibility">Compatibility</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)
    UpdateCompatibility(subject <a href="https://pkg.go.dev/builtin/#string">string</a>, update <a href="#Compatibility">Compatibility</a>) (compatibility <a href="#Compatibility">Compatibility</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)
    GetDefaultCompatibility() (compatibility <a href="#Compatibility">Compatibility</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)
    UpdateDefaultCompatibility(update <a href="#Compatibility">Compatibility</a>) (compatibility <a href="#Compatibility">Compatibility</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)
    GetConfig(subject <a href="https://pkg.go.dev/builtin/#string">string</a>, defaultToGlobal <a href="https://pkg.go.dev/builtin/#bool">bool</a>) (result <a href="#ServerConfig">ServerConfig</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)
    UpdateConfig(subject <a href="https://pkg.go.dev/builtin/#string">string</a>, update <a href="#ServerConfig">ServerConfig</a>) (result <a href="#ServerConfig">ServerConfig</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)
    GetDefaultConfig() (result <a href="#ServerConfig">ServerConfig</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)
    UpdateDefaultConfig(update <a href="#ServerConfig">ServerConfig</a>) (result <a href="#ServerConfig">ServerConfig</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)
    ClearLatestCaches() <a href="https://pkg.go.dev/builtin/#error">error</a>
    ClearCaches() <a href="https://pkg.go.dev/builtin/#error">error</a>
    Close() <a href="https://pkg.go.dev/builtin/#error">error</a>
}</pre>
      <h3 id="NewClient">
       func
       <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=14832:14876#L420">
        NewClient
       </a>
       <a class="permalink" href="#NewClient">
        ¶
       </a>
      </h3>
      <pre>func NewClient(conf *<a href="#Config">Config</a>) (<a href="#Client">Client</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre>
      <p>
       NewClient returns a Client implementation
       <h2 id="Compatibility">
        type
        <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=32172:32194#L954">
         Compatibility
        </a>
        <a class="permalink" href="#Compatibility">
         ¶
        </a>
       </h2>
       <p>
        Compatibility options
        <pre>type Compatibility <a href="https://pkg.go.dev/builtin/#int">int</a></pre>
        <h3 id="Compatibility.MarshalJSON">
         func (*Compatibility)
         <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=32949:33002#L992">
          MarshalJSON
         </a>
         <a class="permalink" href="#Compatibility.MarshalJSON">
          ¶
         </a>
        </h3>
        <pre>func (c *<a href="#Compatibility">Compatibility</a>) MarshalJSON() ([]<a href="https://pkg.go.dev/builtin/#byte">byte</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre>
        <p>
         MarshalJSON implements json.Marshaler
         <h3 id="Compatibility.ParseString">
          func (*Compatibility)
          <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=33425:33478#L1011">
           ParseString
          </a>
          <a class="permalink" href="#Compatibility.ParseString">
           ¶
          </a>
         </h3>
         <pre>func (c *<a href="#Compatibility">Compatibility</a>) ParseString(val <a href="https://pkg.go.dev/builtin/#string">string</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre>
         <p>
          ParseString returns a Compatibility for the given string
          <h3 id="Compatibility.String">
           func (*Compatibility)
           <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=33290:33329#L1006">
            String
           </a>
           <a class="permalink" href="#Compatibility.String">
            ¶
           </a>
          </h3>
          <pre>func (c *<a href="#Compatibility">Compatibility</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre>
          <h3 id="Compatibility.UnmarshalJSON">
           func (*Compatibility)
           <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=33086:33139#L997">
            UnmarshalJSON
           </a>
           <a class="permalink" href="#Compatibility.UnmarshalJSON">
            ¶
           </a>
          </h3>
          <pre>func (c *<a href="#Compatibility">Compatibility</a>) UnmarshalJSON(b []<a href="https://pkg.go.dev/builtin/#byte">byte</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre>
          <p>
           UnmarshalJSON implements json.Unmarshaler
           <h2 id="Config">
            type
            <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/config.go?s=801:846#L16">
             Config
            </a>
            <a class="permalink" href="#Config">
             ¶
            </a>
           </h2>
           <p>
            Config is used to pass multiple configuration options to the Schema Registry client.
            <pre>type Config struct {
    <a href="https://pkg.go.dev/github.com/confluentinc/confluent-kafka-go/v2/schemaregistry/internal/">internal</a>.<a href="https://pkg.go.dev/github.com/confluentinc/confluent-kafka-go/v2/schemaregistry/internal/#ClientConfig">ClientConfig</a>
}
</pre>
            <h3 id="NewConfig">
             func
             <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/config.go?s=918:952#L21">
              NewConfig
             </a>
             <a class="permalink" href="#NewConfig">
              ¶
             </a>
            </h3>
            <pre>func NewConfig(url <a href="https://pkg.go.dev/builtin/#string">string</a>) *<a href="#Config">Config</a></pre>
            <p>
             NewConfig returns a new configuration instance with sane defaults.
             <h3 id="NewConfigWithAuthentication">
              func
              <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/config.go?s=1822:1908#L57">
               NewConfigWithAuthentication
              </a>
              <a class="permalink" href="#NewConfigWithAuthentication">
               ¶
              </a>
             </h3>
             <pre>func NewConfigWithAuthentication(url <a href="https://pkg.go.dev/builtin/#string">string</a>, username <a href="https://pkg.go.dev/builtin/#string">string</a>, password <a href="https://pkg.go.dev/builtin/#string">string</a>) *<a href="#Config">Config</a></pre>
             <p>
              NewConfigWithAuthentication returns a new configuration instance using basic authentication.
For Confluent Cloud, use the API key for the username and the API secret for the password.
This method is deprecated.
              <h3 id="NewConfigWithBasicAuthentication">
               func
               <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/config.go?s=2250:2341#L68">
                NewConfigWithBasicAuthentication
               </a>
               <a class="permalink" href="#NewConfigWithBasicAuthentication">
                ¶
               </a>
              </h3>
              <pre>func NewConfigWithBasicAuthentication(url <a href="https://pkg.go.dev/builtin/#string">string</a>, username <a href="https://pkg.go.dev/builtin/#string">string</a>, password <a href="https://pkg.go.dev/builtin/#string">string</a>) *<a href="#Config">Config</a></pre>
              <p>
               NewConfigWithBasicAuthentication returns a new configuration instance using basic authentication.
For Confluent Cloud, use the API key for the username and the API secret for the password.
               <h3 id="NewConfigWithBearerAuthentication">
                func
                <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/config.go?s=2720:2811#L80">
                 NewConfigWithBearerAuthentication
                </a>
                <a class="permalink" href="#NewConfigWithBearerAuthentication">
                 ¶
                </a>
               </h3>
               <pre>func NewConfigWithBearerAuthentication(url, token, targetSr, identityPoolID <a href="https://pkg.go.dev/builtin/#string">string</a>) *<a href="#Config">Config</a></pre>
               <p>
                NewConfigWithBearerAuthentication returns a new configuration instance using bearer authentication.
For Confluent Cloud, targetSr(`bearer.auth.logical.cluster` and
identityPoolID(`bearer.auth.identity.pool.id`) is required
                <h2 id="Metadata">
                 type
                 <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=6367:6570#L189">
                  Metadata
                 </a>
                 <a class="permalink" href="#Metadata">
                  ¶
                 </a>
                </h2>
                <p>
                 Metadata represents user-defined metadata
                 <pre>type Metadata struct {
<span id="Metadata.Tags"></span>    Tags       map[<a href="https://pkg.go.dev/builtin/#string">string</a>][]<a href="https://pkg.go.dev/builtin/#string">string</a> `json:"tags,omitempty"`
<span id="Metadata.Properties"></span>    Properties map[<a href="https://pkg.go.dev/builtin/#string">string</a>]<a href="https://pkg.go.dev/builtin/#string">string</a>   `json:"properties,omitempty"`
<span id="Metadata.Sensitive"></span>    Sensitive  []<a href="https://pkg.go.dev/builtin/#string">string</a>            `json:"sensitive,omitempty"`
}
</pre>
                 <h2 id="Reference">
                  type
                  <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=6615:6736#L196">
                   Reference
                  </a>
                  <a class="permalink" href="#Reference">
                   ¶
                  </a>
                 </h2>
                 <p>
                  Reference represents a schema reference
                  <pre>type Reference struct {
<span id="Reference.Name"></span>    Name    <a href="https://pkg.go.dev/builtin/#string">string</a> `json:"name"`
<span id="Reference.Subject"></span>    Subject <a href="https://pkg.go.dev/builtin/#string">string</a> `json:"subject"`
<span id="Reference.Version"></span>    Version <a href="https://pkg.go.dev/builtin/#int">int</a>    `json:"version"`
}
</pre>
                  <h2 id="Rule">
                   type
                   <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=3412:4129#L69">
                    Rule
                   </a>
                   <a class="permalink" href="#Rule">
                    ¶
                   </a>
                  </h2>
                  <p>
                   Rule represents a data contract rule
                   <pre>type Rule struct {
    <span class="comment">// Rule name</span>
<span id="Rule.Name"></span>    Name <a href="https://pkg.go.dev/builtin/#string">string</a> `json:"name,omitempty"`
    <span class="comment">// Rule doc</span>
<span id="Rule.Doc"></span>    Doc <a href="https://pkg.go.dev/builtin/#string">string</a> `json:"doc,omitempty"`
    <span class="comment">// Rule kind</span>
<span id="Rule.Kind"></span>    Kind <a href="https://pkg.go.dev/builtin/#string">string</a> `json:"kind,omitempty"`
    <span class="comment">// Rule mode</span>
<span id="Rule.Mode"></span>    Mode <a href="https://pkg.go.dev/builtin/#string">string</a> `json:"mode,omitempty"`
    <span class="comment">// Rule type</span>
<span id="Rule.Type"></span>    Type <a href="https://pkg.go.dev/builtin/#string">string</a> `json:"type,omitempty"`
    <span class="comment">// The tags to which this rule applies</span>
<span id="Rule.Tags"></span>    Tags []<a href="https://pkg.go.dev/builtin/#string">string</a> `json:"tags,omitempty"`
    <span class="comment">// Optional params for the rule</span>
<span id="Rule.Params"></span>    Params map[<a href="https://pkg.go.dev/builtin/#string">string</a>]<a href="https://pkg.go.dev/builtin/#string">string</a> `json:"params,omitempty"`
    <span class="comment">// Rule expression</span>
<span id="Rule.Expr"></span>    Expr <a href="https://pkg.go.dev/builtin/#string">string</a> `json:"expr,omitempty"`
    <span class="comment">// Rule action on success</span>
<span id="Rule.OnSuccess"></span>    OnSuccess <a href="https://pkg.go.dev/builtin/#string">string</a> `json:"onSuccess,omitempty"`
    <span class="comment">// Rule action on failure</span>
<span id="Rule.OnFailure"></span>    OnFailure <a href="https://pkg.go.dev/builtin/#string">string</a> `json:"onFailure,omitempty"`
    <span class="comment">// Whether the rule is disabled</span>
<span id="Rule.Disabled"></span>    Disabled <a href="https://pkg.go.dev/builtin/#bool">bool</a> `json:"disabled,omitempty"`
}
</pre>
                   <h2 id="RuleMode">
                    type
                    <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=4417:4436#L107">
                     RuleMode
                    </a>
                    <a class="permalink" href="#RuleMode">
                     ¶
                    </a>
                   </h2>
                   <p>
                    RuleMode represents the rule mode
                    <pre>type RuleMode = <a href="https://pkg.go.dev/builtin/#int">int</a></pre>
                    <h3 id="ParseMode">
                     func
                     <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=4943:4987#L134">
                      ParseMode
                     </a>
                     <a class="permalink" href="#ParseMode">
                      ¶
                     </a>
                    </h3>
                    <pre>func ParseMode(mode <a href="https://pkg.go.dev/builtin/#string">string</a>) (<a href="#RuleMode">RuleMode</a>, <a href="https://pkg.go.dev/builtin/#bool">bool</a>)</pre>
                    <p>
                     ParseMode parses the given rule mode
                     <h2 id="RulePhase">
                      type
                      <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=4170:4190#L95">
                       RulePhase
                      </a>
                      <a class="permalink" href="#RulePhase">
                       ¶
                      </a>
                     </h2>
                     <p>
                      RulePhase represents the rule phase
                      <pre>type RulePhase = <a href="https://pkg.go.dev/builtin/#int">int</a></pre>
                      <h2 id="RuleSet">
                       type
                       <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=5093:5283#L140">
                        RuleSet
                       </a>
                       <a class="permalink" href="#RuleSet">
                        ¶
                       </a>
                      </h2>
                      <p>
                       RuleSet represents a data contract rule set
                       <pre>type RuleSet struct {
<span id="RuleSet.MigrationRules"></span>    MigrationRules []<a href="#Rule">Rule</a> `json:"migrationRules,omitempty"`
<span id="RuleSet.DomainRules"></span>    DomainRules    []<a href="#Rule">Rule</a> `json:"domainRules,omitempty"`
<span id="RuleSet.EncodingRules"></span>    EncodingRules  []<a href="#Rule">Rule</a> `json:"encodingRules,omitempty"`
}
</pre>
                       <h3 id="RuleSet.HasRules">
                        func (*RuleSet)
                        <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=5348:5411#L147">
                         HasRules
                        </a>
                        <a class="permalink" href="#RuleSet.HasRules">
                         ¶
                        </a>
                       </h3>
                       <pre>func (r *<a href="#RuleSet">RuleSet</a>) HasRules(phase <a href="#RulePhase">RulePhase</a>, mode <a href="#RuleMode">RuleMode</a>) <a href="https://pkg.go.dev/builtin/#bool">bool</a></pre>
                       <p>
                        HasRules checks if the ruleset has rules for the given mode
                        <h2 id="SchemaInfo">
                         type
                         <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=6788:7075#L203">
                          SchemaInfo
                         </a>
                         <a class="permalink" href="#SchemaInfo">
                          ¶
                         </a>
                        </h2>
                        <p>
                         SchemaInfo represents basic schema information
                         <pre>type SchemaInfo struct {
<span id="SchemaInfo.Schema"></span>    Schema     <a href="https://pkg.go.dev/builtin/#string">string</a>      `json:"schema,omitempty"`
<span id="SchemaInfo.SchemaType"></span>    SchemaType <a href="https://pkg.go.dev/builtin/#string">string</a>      `json:"schemaType,omitempty"`
<span id="SchemaInfo.References"></span>    References []<a href="#Reference">Reference</a> `json:"references,omitempty"`
<span id="SchemaInfo.Metadata"></span>    Metadata   *<a href="#Metadata">Metadata</a>   `json:"metadata,omitempty"`
<span id="SchemaInfo.RuleSet"></span>    RuleSet    *<a href="#RuleSet">RuleSet</a>    `json:"ruleSet,omitempty"`
}
</pre>
                         <h3 id="SchemaInfo.MarshalJSON">
                          func (*SchemaInfo)
                          <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=7315:7366#L218">
                           MarshalJSON
                          </a>
                          <a class="permalink" href="#SchemaInfo.MarshalJSON">
                           ¶
                          </a>
                         </h3>
                         <pre>func (sd *<a href="#SchemaInfo">SchemaInfo</a>) MarshalJSON() ([]<a href="https://pkg.go.dev/builtin/#byte">byte</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre>
                         <p>
                          MarshalJSON implements the json.Marshaler interface
                          <h3 id="SchemaInfo.UnmarshalJSON">
                           func (*SchemaInfo)
                           <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=7813:7864#L235">
                            UnmarshalJSON
                           </a>
                           <a class="permalink" href="#SchemaInfo.UnmarshalJSON">
                            ¶
                           </a>
                          </h3>
                          <pre>func (sd *<a href="#SchemaInfo">SchemaInfo</a>) UnmarshalJSON(b []<a href="https://pkg.go.dev/builtin/#byte">byte</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre>
                          <p>
                           UnmarshalJSON implements the json.Unmarshaller interface
                           <h2 id="SchemaMetadata">
                            type
                            <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=8405:8611#L257">
                             SchemaMetadata
                            </a>
                            <a class="permalink" href="#SchemaMetadata">
                             ¶
                            </a>
                           </h2>
                           <p>
                            SchemaMetadata represents schema metadata
                            <pre>type SchemaMetadata struct {
    <a href="#SchemaInfo">SchemaInfo</a>
<span id="SchemaMetadata.ID"></span>    ID      <a href="https://pkg.go.dev/builtin/#int">int</a>    `json:"id,omitempty"`
<span id="SchemaMetadata.GUID"></span>    GUID    <a href="https://pkg.go.dev/builtin/#string">string</a> `json:"guid,omitempty"`
<span id="SchemaMetadata.Subject"></span>    Subject <a href="https://pkg.go.dev/builtin/#string">string</a> `json:"subject,omitempty"`
<span id="SchemaMetadata.Version"></span>    Version <a href="https://pkg.go.dev/builtin/#int">int</a>    `json:"version,omitempty"`
}
</pre>
                            <h3 id="SchemaMetadata.MarshalJSON">
                             func (*SchemaMetadata)
                             <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=8668:8723#L266">
                              MarshalJSON
                             </a>
                             <a class="permalink" href="#SchemaMetadata.MarshalJSON">
                              ¶
                             </a>
                            </h3>
                            <pre>func (sd *<a href="#SchemaMetadata">SchemaMetadata</a>) MarshalJSON() ([]<a href="https://pkg.go.dev/builtin/#byte">byte</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre>
                            <p>
                             MarshalJSON implements the json.Marshaler interface
                             <h3 id="SchemaMetadata.UnmarshalJSON">
                              func (*SchemaMetadata)
                              <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=9418:9473#L291">
                               UnmarshalJSON
                              </a>
                              <a class="permalink" href="#SchemaMetadata.UnmarshalJSON">
                               ¶
                              </a>
                             </h3>
                             <pre>func (sd *<a href="#SchemaMetadata">SchemaMetadata</a>) UnmarshalJSON(b []<a href="https://pkg.go.dev/builtin/#byte">byte</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre>
                             <p>
                              UnmarshalJSON implements the json.Unmarshaller interface
                              <h2 id="ServerConfig">
                               type
                               <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=10383:11029#L322">
                                ServerConfig
                               </a>
                               <a class="permalink" href="#ServerConfig">
                                ¶
                               </a>
                              </h2>
                              <p>
                               ServerConfig represents config params for Schema Registry
                               <pre>NOTE: GET uses compatibilityLevel, POST uses compatibility
</pre>
                               <pre>type ServerConfig struct {
<span id="ServerConfig.Alias"></span>    Alias               <a href="https://pkg.go.dev/builtin/#string">string</a>        `json:"alias,omitempty"`
<span id="ServerConfig.Normalize"></span>    Normalize           <a href="https://pkg.go.dev/builtin/#bool">bool</a>          `json:"normalize,omitempty"`
<span id="ServerConfig.CompatibilityUpdate"></span>    CompatibilityUpdate <a href="#Compatibility">Compatibility</a> `json:"compatibility,omitempty"`
<span id="ServerConfig.CompatibilityLevel"></span>    CompatibilityLevel  <a href="#Compatibility">Compatibility</a> `json:"compatibilityLevel,omitempty"`
<span id="ServerConfig.CompatibilityGroup"></span>    CompatibilityGroup  <a href="https://pkg.go.dev/builtin/#string">string</a>        `json:"compatibilityGroup,omitempty"`
<span id="ServerConfig.DefaultMetadata"></span>    DefaultMetadata     *<a href="#Metadata">Metadata</a>     `json:"defaultMetadata,omitempty"`
<span id="ServerConfig.OverrideMetadata"></span>    OverrideMetadata    *<a href="#Metadata">Metadata</a>     `json:"overrideMetadata,omitempty"`
<span id="ServerConfig.DefaultRuleSet"></span>    DefaultRuleSet      *<a href="#RuleSet">RuleSet</a>      `json:"defaultRuleSet,omitempty"`
<span id="ServerConfig.OverrideRuleSet"></span>    OverrideRuleSet     *<a href="#RuleSet">RuleSet</a>      `json:"overrideRuleSet,omitempty"`
}
</pre>
                               <h2 id="SubjectAndVersion">
                                type
                                <a href="https://github.com/confluentinc/confluent-kafka-go/blob/v2.12.0/schemaregistry/schemaregistry_client.go?s=7139:7258#L212">
                                 SubjectAndVersion
                                </a>
                                <a class="permalink" href="#SubjectAndVersion">
                                 ¶
                                </a>
                               </h2>
                               <p>
                                SubjectAndVersion represents a pair of subject and version
                                <pre>type SubjectAndVersion struct {
<span id="SubjectAndVersion.Subject"></span>    Subject <a href="https://pkg.go.dev/builtin/#string">string</a> `json:"subject,omitempty"`
<span id="SubjectAndVersion.Version"></span>    Version <a href="https://pkg.go.dev/builtin/#int">int</a>    `json:"version,omitempty"`
}
</pre>
                                <div id="footer">
                                 Build version go1.22.2.
                                 <br/>
                                 Except as
                                 <a href="https://developers.google.com/site-policies#restrictions">
                                  noted
                                 </a>
                                 ,
the content of this page is licensed under the
Creative Commons Attribution 3.0 License,
and code is licensed under a
                                 <a href="https://go.dev/LICENSE">
                                  BSD license
                                 </a>
                                 .
                                 <br/>
                                 <a href="https://golang.org/doc/tos.html">
                                  Terms of Service
                                 </a>
                                 |
                                 <a href="https://www.google.com/intl/en/policies/privacy/">
                                  Privacy Policy
                                 </a>
                                </div>
                               </p>
                              </p>
                             </p>
                            </p>
                           </p>
                          </p>
                         </p>
                        </p>
                       </p>
                      </p>
                     </p>
                    </p>
                   </p>
                  </p>
                 </p>
                </p>
               </p>
              </p>
             </p>
            </p>
           </p>
          </p>
         </p>
        </p>
       </p>
      </p>
     </p>
    </p>
   </div>
   <!-- .container -->
  </div>
  <!-- #page -->
 </body>
</html>

